<?php

class DATABASE_CONFIG {

	public $default = array(
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => '127.0.0.1',
		'login' => 'root',
		'password' => 'root',
		'database' => 'geospot',
		'prefix' => '',
		'encoding' => 'utf8',
	);
	
	public $development = array (
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => '127.0.0.1',
		'login' => 'root',
		'password' => 'root',
		'database' => 'geospot',
		'prefix' => '',
		'encoding' => 'utf8',
	);
	
	public $production = array (
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => 'localhost',
		'login' => '',
		'password' => '',
		'database' => 'geospot',
		'prefix' => '',
		'encoding' => 'utf8',
	);
	
	public $test = array (
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => '127.0.0.1',
		'login' => 'root',
		'password' => 'root',
		'database' => 'geospot_test',
		'prefix' => '',
		'encoding' => 'utf8',
	);
	
	
	public function __construct() {
		if( defined('ENVIRONMENT') ) {
			switch(ENVIRONMENT) {
				case 'development':
					$this->default = $this->development;
					break;
				case 'production':
				default:
					$this->default = $this->production;
					break;
			}
		}
	}
	
}
